<?php
	class newsrelationModel extends relationModel {
	    public $table = "news";
	    public $join = array(
	        "category" => array(
	            "type" => "belongs_to",
	            "foreign_key" => "catid"
	        ),
	        "news_data" => array(
	            "type" => "has_one",
	            "foreign_key" => "nid"
	        ),
	    	'attrrelation' => array(
	    		'type'=>'has_many',
	    		'foreign_key'=>'nid',
	    	),
	    	
	    );
	
	}

?>
